<style>
.setimg{
	margin:-2px 5px 0 0 
}
</style>
<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
    <button class="btn btn-primary ifrm" data-url="/menu/add" data-width="520" data-height="360" data-title="添加顶级菜单" data-params="" style="float:right;padding:3px 6px">添加顶级菜单</button>
	    <div class="btn-toolbar">
		    <form>
		    	<label style="display: inline;">名称：</label><input class="input input-medium" type="text" name="circle_title" value="<?=I('get.circle_title')?>" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>
		      	<input type="hidden" name='res' value="<?=I('get.res')?>">
		    </form>
		</div>
		<table class="table">
		      <thead>
		        <tr>
		          <th style="text-align:center;width:100px">序号id</th>
		          <th style="text-align:center;width:170px">名称</th>
		      	  <th style="text-align:center;width:180px">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($data){foreach($data AS $key=>$val){ ?>
		        <tr>
                    <td style="text-align:center;vertical-align:middle;"><?=$val['id']?></td>
                    <td style="text-align:center;vertical-align:middle;"><?=$val['title']?></td>
		          <td style="text-align:center;vertical-align:middle;">
                      <a class="ifrm" href="javascript:void(0)" data-url="/menu/add" data-width="770" data-height="360" style="padding: 0px 4px;" data-title="修改信息" data-params="id/<?=$val['id']?>">修改信息</a>&nbsp;&nbsp;
                      <a class="ifrm" href="javascript:void(0)" data-url="/menu/add" data-width="770" data-height="360" style="padding: 0px 4px;" data-title="添加信息" data-params="pid/<?=$val['id']?>">添加子类</a>&nbsp;&nbsp;
                      <a href="/menu/deRole?id=<?=$val['id']?>" style="padding: 0px 4px;" class="deproject" title="删除" role="button" data-toggle="modal">删除</a>
                <?php if($val['next']){ ?>
                      <a href="/menu/index?pid=<?=$val['id']?>&res=<?=I('get.res')?>" style="padding: 0px 4px;margin-left:8px;" title="查看详情" role="button" data-toggle="modal">查看</a>
                <?php }?>
				 </td>
		        </tr>
		        <?php }}else{?>
		        	<tr><td style="text-align:center" colspan=7>暂无数据</td></tr>
		        <?php }?>
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('.deproject').click(function() {
		if(!window.confirm('确认要删除吗')){
			return false;
		}
	});
})
</script>